package com.pengxun.manager.enums;

/**
 * @author zhongzhu
 * @Title: code-manager
 * @Package com.szeastroc.manager.enums
 * @Description:
 * @date 2018/10/1711:37
 */
public enum OpreationStatusEnum {
    WAIT_IMPORT(-1,"上传成功未开始导入"),
    IMPORTING(0,"导入中"),
    FAIL(2,"导入失败"),
    SUCCESS(1,"导入成功"),
    ;

    private Integer type;

    private String desc;

    OpreationStatusEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static OpreationStatusEnum getEnumByType(Integer type){
        OpreationStatusEnum[] enums = OpreationStatusEnum.values();
        for(OpreationStatusEnum statusEnum:enums){
            if(statusEnum.getType()  == type){
                return statusEnum;
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
